import { combineReducers } from 'redux';
import configureStore from './createStore';
import rootSaga from '../sagas/';
import userReducer from './user';
import postReducer from './post';
import resourceReducer from './resource';

function createStore() {
  const rootReducer = combineReducers({
    user: userReducer,
    post: postReducer,
    resource: resourceReducer
  });

  return configureStore(rootReducer, rootSaga);
}

export default createStore();
